﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {

    public class Storage extends Decoration {

        private const STORAGE:String = "storage";

        public function Storage(_arg1:String=null){
            super(_arg1);
            setState(STATE_STATIC);
            m_typeName = this.STORAGE;
        }
        public function getCommodityNames():Array{
            var _local1:Array = [];
            var _local2:XML = m_item.commodityXml;
            _local1.push(String(_local2.@name));
            return (_local1);
        }
        public function getCommodities():Array{
            var _local1:Array = [];
            var _local2:XML = m_item.commodityXml;
            _local1.push(_local2);
            return (_local1);
        }
        override public function getToolTipStatus():String{
            var _local2:XML;
            var _local3:String;
            var _local4:String;
            var _local5:int;
            var _local6:int;
            var _local7:int;
            var _local1:String;
            if (((!(Global.isVisiting())) && (!(Global.world.isEditMode)))){
                _local2 = getItem().commodityXml;
                if (_local2){
                    _local3 = _local2.@name;
                    _local4 = ZLoc.t("Main", (("Commodity_" + _local3) + "_friendlyName"));
                    _local5 = Global.player.commodities.getCapacity(_local3);
                    _local6 = Global.player.commodities.getCount(_local3);
                    _local7 = int(_local2.@capacity);
                    _local1 = ZLoc.t("Main", "StorageToolTip", {
                        storageCap:_local7,
                        commodity:_local4
                    });
                };
            };
            return (_local1);
        }
        override public function isPlacedObjectNonBuilding():Boolean{
            return (false);
        }

    }
}//package Classes 
